<template>
	<view class="rbody">
		<view class="bInfo">
			<view class="avatar">
				<image :src=" userInfo.avatarUrl || '/static/imgs/usered.png'" mode=""></image>
			</view>
			<view class="user-det">
				<text style="font-size: 18px;font-weight: bold;">{{userInfo.nickName || '--'}}</text>
				<u-icon :name="sex" color="#2979ff" :label="genderDesc" labelSize="13" :color="colorIcon"></u-icon>
				<view style="display: flex;">
					<!-- <u-icon name="calendar" color="#2979ff"></u-icon> -->
					<text>&nbsp{{userInfo.schoolName}}-{{userInfo.department == '0'?'--' : userInfo.depName}}&nbsp;{{userInfo.grade== '0'?'--' : userInfo.grade+'级' }}</text>
				</view>
			</view>
		</view>
		<view class="desc-box">
			<view class="title">个人技能</view>
			<view class="det" v-html="userInfo.skills || '--'"></view>
			<view class="title">校内经历</view>
			<view class="det" v-html="userInfo.exp || '--'"></view>
			<view class="title">自我评价</view>
			<view class="det" v-html="userInfo.selfdesc || '--'"></view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			userinfo: Object
		},
		data() {
			return {
				userInfo: {}
			}
		},
		watch: {
			userinfo(n, o) {
				this.userInfo = n
			}
		},
		computed: {
			colorIcon (){
				return this.userInfo.gender == 0 ? '#5ea0ff' : '#f92672'
			},
			genderDesc() {
				return this.userInfo.gender == 0 ? '男' : '女'
			},
			sex() {
				return this.userInfo.gender == 0 ? 'man' : 'woman'
			}
		},
		onLoad() {

		}
	}
</script>

<style lang="scss" scoped>
	.rbody {
		width: 100%;
		background-color: #fff;
	}

	.bInfo {
		width: 100%;
		height: 200rpx;
		display: flex;
		align-items: center;
		padding: 10rpx 0rpx 20rpx 50rpx;

		.avatar {
			width: 120rpx;
			height: 120rpx;
			border-radius: 60rpx;
			overflow: hidden;
			margin-right: 25rpx;
			background-color: #000;

			image {
				width: 100%;
				height: 100%;
			}
		}

		.user-det {
			display: flex;
			flex-direction: column;

			text {
				font-size: 13px;
			}

			;
		}
	}

	.desc-box {
		width: 100%;
		padding-bottom: 15rpx;

		.det {
			width: 78%;
			margin: 0 0 30rpx 60rpx;
			padding: 20rpx;
			background-color: #f3f4f6;
			border-radius: 20rpx;
		}
	}

	.title {
		margin: 0 0 20rpx 50rpx;
		border-bottom: 1rpx solid linear-gradient(to left, #5866f5, #eee);
		display: flex;
		align-items: center;
		font-weight: bold;
	}

	.title::before {
		display: inline-block;
		content: '';
		width: 10rpx;
		border-radius: 5rpx;
		height: 35rpx;
		margin-right: 15rpx;
		background: linear-gradient(to left, #5866f5, #4492f0);
	}
</style>
